package com.wh.hotel.controller;

import com.wh.hotel.model.HotelTest;
import com.wh.hotel.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author luweije
 */
@RequestMapping("/test")
@RestController
@Slf4j
public class TestController {

    @Resource
    private TestService testService;

    @GetMapping("/first")
    public Object first() {
        HotelTest hotelTest = new HotelTest();
        hotelTest.setUid(11L);
        hotelTest.setNickname("hahah");
        return testService.insert(hotelTest);
    }
}
